package com.group2.view;

import java.awt.BorderLayout;
import java.awt.EventQueue;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import javax.swing.GroupLayout;
import javax.swing.GroupLayout.Alignment;
import javax.swing.JMenuBar;
import javax.swing.JButton;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import java.awt.CardLayout;
import java.io.IOException;

import model.*;
import static model.netBase.IP;
public class BankMainFrame_Admin extends JFrame {

	private JPanel contentPane;
	CardLayout cardlayout=new CardLayout(0, 0);

	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					BankMainFrame_Admin frame = new BankMainFrame_Admin();
					frame.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	/**
	 * Create the frame.
	 */
	public BankMainFrame_Admin() throws IOException, ClassNotFoundException {
		setTitle("一卡通管理系统");
		setBounds(100, 100, 431, 396);
		this.setLocationRelativeTo(null);
		this.setResizable(false);
		JMenuBar menuBar = new JMenuBar();
		setJMenuBar(menuBar);
		
		JButton btnNewButton = new JButton("奖学金发放");
		btnNewButton.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				cardlayout.show(contentPane,"奖学金发放");
			}
		});  
		menuBar.add(btnNewButton);
		
		JButton btnNewButton_1 = new JButton("待缴费名单查询");
		btnNewButton_1.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				cardlayout.show(contentPane,"缴费通知");
			}
		});
		menuBar.add(btnNewButton_1);
		contentPane = new JPanel();
		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		setContentPane(contentPane);
		contentPane.setLayout(cardlayout);
		
		BankBonusFrame bankBonusFrame=new BankBonusFrame();
		contentPane.add(bankBonusFrame,"奖学金发放");
		
		BankRemindPayFrame bankRemindPayFrame=new BankRemindPayFrame();
		contentPane.add(bankRemindPayFrame,"缴费通知");
	}

}
